Optimal. Leaf size=50 \[ \frac {2 p}{x}+\frac {2 \sqrt {a} p \tan ^{-1}\left (\frac {\sqrt {a} x}{\sqrt {b}}\right )}{\sqrt {b}}-\frac {\log \left (c \left (a+\frac {b}{x^2}\right )^p\right )}{x} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.02, antiderivative size = 50, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 4, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {2505, 269, 331,
211} \begin {gather*} \frac {2 \sqrt {a} p \text {ArcTan}\left (\frac {\sqrt {a} x}{\sqrt {b}}\right )}{\sqrt {b}}-\frac {\log \left (c \left (a+\frac {b}{x^2}\right )^p\right )}{x}+\frac {2 p}{x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 211
Rule 269
Rule 331
Rule 2505
Rubi steps
\begin {align*} \int \frac {\log \left (c \left (a+\frac {b}{x^2}\right )^p\right )}{x^2} \, dx &=-\frac {\log \left (c \left (a+\frac {b}{x^2}\right )^p\right )}{x}-(2 b p) \int \frac {1}{\left (a+\frac {b}{x^2}\right ) x^4} \, dx\\ &=-\frac {\log \left (c \left (a+\frac {b}{x^2}\right )^p\right )}{x}-(2 b p) \int \frac {1}{x^2 \left (b+a x^2\right )} \, dx\\ &=\frac {2 p}{x}-\frac {\log \left (c \left (a+\frac {b}{x^2}\right )^p\right )}{x}+(2 a p) \int \frac {1}{b+a x^2} \, dx\\ &=\frac {2 p}{x}+\frac {2 \sqrt {a} p \tan ^{-1}\left (\frac {\sqrt {a} x}{\sqrt {b}}\right )}{\sqrt {b}}-\frac {\log \left (c \left (a+\frac {b}{x^2}\right )^p\right )}{x}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.01, size = 52, normalized size = 1.04 \begin {gather*} \frac {2 p}{x}-\frac {2 \sqrt {a} p \tan ^{-1}\left (\frac {\sqrt {b}}{\sqrt {a} x}\right )}{\sqrt {b}}-\frac {\log \left (c \left (a+\frac {b}{x^2}\right )^p\right )}{x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.04, size = 0, normalized size = 0.00 \[\int \frac {\ln \left (c \left (a +\frac {b}{x^{2}}\right )^{p}\right )}{x^{2}}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.55, size = 49, normalized size = 0.98 \begin {gather*} 2 \, b p {\left (\frac {a \arctan \left (\frac {a x}{\sqrt {a b}}\right )}{\sqrt {a b} b} + \frac {1}{b x}\right )} - \frac {\log \left ({\left (a + \frac {b}{x^{2}}\right )}^{p} c\right )}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.36, size = 119, normalized size = 2.38 \begin {gather*} \left [\frac {p x \sqrt {-\frac {a}{b}} \log \left (\frac {a x^{2} + 2 \, b x \sqrt {-\frac {a}{b}} - b}{a x^{2} + b}\right ) - p \log \left (\frac {a x^{2} + b}{x^{2}}\right ) + 2 \, p - \log \left (c\right )}{x}, \frac {2 \, p x \sqrt {\frac {a}{b}} \arctan \left (x \sqrt {\frac {a}{b}}\right ) - p \log \left (\frac {a x^{2} + b}{x^{2}}\right ) + 2 \, p - \log \left (c\right )}{x}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 97 vs.
\(2 (44) = 88\).
time = 8.70, size = 97, normalized size = 1.94 \begin {gather*} \begin {cases} - \frac {\log {\left (0^{p} c \right )}}{x} & \text {for}\: a = 0 \wedge b = 0 \\\frac {2 p}{x} - \frac {\log {\left (c \left (\frac {b}{x^{2}}\right )^{p} \right )}}{x} & \text {for}\: a = 0 \\- \frac {\log {\left (a^{p} c \right )}}{x} & \text {for}\: b = 0 \\\frac {p \log {\left (x - \sqrt {- \frac {b}{a}} \right )}}{\sqrt {- \frac {b}{a}}} - \frac {p \log {\left (x + \sqrt {- \frac {b}{a}} \right )}}{\sqrt {- \frac {b}{a}}} + \frac {2 p}{x} - \frac {\log {\left (c \left (a + \frac {b}{x^{2}}\right )^{p} \right )}}{x} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 4.93, size = 54, normalized size = 1.08 \begin {gather*} \frac {2 \, a p \arctan \left (\frac {a x}{\sqrt {a b}}\right )}{\sqrt {a b}} - \frac {p \log \left (a x^{2} + b\right )}{x} + \frac {p \log \left (x^{2}\right )}{x} + \frac {2 \, p - \log \left (c\right )}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.24, size = 42, normalized size = 0.84 \begin {gather*} \frac {2\,p}{x}-\frac {\ln \left (c\,{\left (a+\frac {b}{x^2}\right )}^p\right )}{x}+\frac {2\,\sqrt {a}\,p\,\mathrm {atan}\left (\frac {\sqrt {a}\,x}{\sqrt {b}}\right )}{\sqrt {b}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________